-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't return categoryId from registry if the product doesn't belong in the current category #19232
Don't return categoryId from registry if the product doesn't belong in the current category #19232
Conversation
Hi @ErikPel. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
@magento-engcom-team give me test instance |
Hi @okorshenko. Thank you for your request. I'm working on Magento instance for you |
Hi @okorshenko, here is your new Magento instance. |
Hey @ErikPel Could you please take a look at failing integration tests? |
5d67949
to
d0e4a90
Compare
Fixed the integration tests |
…n current category
c9dd644
to
a5dd6dc
Compare
…sn't belong in the current category #19232
Hi @ErikPel. Thank you for your contribution. |
Description (*)
I added is_array check to \Magento\Catalog\Model\Product:getCategoryId that check whether the product belongs to the current_category set in registry. This fixes getProductUrl function not returning correct url since there isn't url rewrite for product in that category.
Fixed Issues (if relevant)
Manual testing scenarios (*)
Contribution checklist (*)